home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / util4 / 0utils.lha / 0Utils / SetOwner.data < prev    next >
Text File  |  1995-08-19  |  1KB  |  70 lines

  1.  
  2. #ifdef TPLTER
  3.  
  4. SetOwner = {
  5.  
  6.     MinVersion = "39";
  7.  
  8.     SHORT = {{ change ownership of a FS object }};
  9.  
  10.     DESCRIPTION = {{
  11.     change the ownerid of a certain FileSystem
  12.     Object.
  13.  
  14.     Currently this command is not very senseful,
  15.     since it does not accept things like OwnerName
  16.     or GroupName, to evaluate the OwnerID, and since
  17.     it does not act on FilePatterns
  18.  
  19.      RESULT
  20.     none (except for error messages)
  21.     }};
  22.  
  23.     NOTES = {{
  24.     needs _v39_ or better
  25.  
  26.     This command is IMHO senseless for everyday
  27.     usage.
  28.     (I needed it when playing w/ a ramdisk, since
  29.     I could not find docs about ACTION_SETOWNER)
  30.     }};
  31.  
  32.     EXAMPLES = {{
  33.     >SetOwner Work:Data
  34.     }};
  35.  
  36.     TODO = {{
  37.     we should better add
  38.     * access to an id database instead of simple ownership id
  39.     }};
  40.  
  41.     HISTORY = {{
  42.     26-03-95 b_noll created
  43.     19-08-95 b_noll created .data file
  44.     }};
  45.  
  46.  
  47.     Template = "PATH/M/A,OWNERID/N/A";
  48.     Arguments = {{
  49.     STRPTR *path;
  50.     ULONG  *ownerid;
  51.     }};
  52.  
  53.     version = "1.0";
  54.  
  55.     body = {{
  56.         if (((struct Library *)DOSBase)->lib_Version >= 39) {
  57.         int i;
  58.         retval = RETURN_OK;
  59.         for (i = 0; argv->path[i] && !retval; ++i) {
  60.             if (!SetOwner (argv->path[i], *argv->ownerid))
  61.             retval = RETURN_ERROR;
  62.         } /* for */
  63.         } else
  64.         SetIoErr(ERROR_INVALID_RESIDENT_LIBRARY);
  65.     }};
  66. };
  67.  
  68. #endif
  69.  
  70.